package com.atguigu.tingshu.album.service;

import com.atguigu.tingshu.common.result.Result;
import com.atguigu.tingshu.model.album.TrackInfo;
import com.atguigu.tingshu.query.album.TrackInfoQuery;
import com.atguigu.tingshu.vo.album.AlbumTrackListVo;
import com.atguigu.tingshu.vo.album.TrackInfoVo;
import com.atguigu.tingshu.vo.album.TrackListVo;
import com.atguigu.tingshu.vo.album.TrackStatVo;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import org.springframework.web.multipart.MultipartFile;

import java.util.List;
import java.util.Map;

public interface TrackInfoService extends IService<TrackInfo> {

    Map<String, Object> uploadTrack(MultipartFile file);

    void saveTrackInfo(TrackInfoVo trackInfoVo);

    Page<TrackListVo> findUserTrackPage(Page<TrackListVo> trackListVoPage, TrackInfoQuery trackInfoQuery);

    TrackInfo getTrackInfo(Long trackId);

    void updateTrackInfo(TrackInfoVo trackInfoVo, Long trackId);

    void removeTrackInfo(Long trackId);

    IPage<AlbumTrackListVo> findAlbumTrackPage(Long albumId, IPage<AlbumTrackListVo> albumTrackListVoPage);

    TrackStatVo getTrackStatVo(Long trackId);

    /*
     * @description: TODO 分集展示要购买的声音列表
     * @author: yyj
     * @date: 2025-02-10
    */
    List<Map<String, Object>> findUserTrackPaidList(Long currentTrackId);

    /*
     * @description: TODO 既能把买过的声音查询出来又能把买过的声音过滤掉 返回真正能买的声音
     * @author: yyj
     * @date: 2025-02-10
    */
    Result getPaidTrackAndFilterCanPayTrack(Long userId, Long albumId, Integer trackCount, Long trackId);
}
